package ldkxingzhe.l365calendar.model;

/**
 * Created by ke on 16-1-31.
 */
public class TimeStore {

    public static long[] alarmTime = new long[]{
            0, 0x493E0, 0x927C0, 0x1B7740, // 正点，　5分钟　１０分钟　３０　分钟
            0x36EE80, 0x5265C00, 0xF731400, // 一个小时前，　１天前，　3天前
            -1
    };

    public static long[] allDayTime = new long[]{
            0, 0x5265C00, 0xA4CB800, // 正点, 一天前，　两天前
            0xF731400, -1            // 三天前，　不提醒
    };

    /**
     * 返回value所在的位置，　否则为-1
     */
    public static int indexOf(long value, boolean isAllDay){
        long[] array = isAllDay ? allDayTime : alarmTime;
        for(int i = 0; i < array.length; i++){
            if(array[i] == value){
                return i;
            }
        }
        return -1;
    }
}
